<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/css/customStyle.css" rel="stylesheet" type="text/css">
    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script src="/js/vue.min.js"></script>
</head>
<body>

<div class="container-fluid" style="margin-top: 8px">
    <div class="col-md-3" style="height: 100%">
        <div aria-multiselectable="true" class="panel-group" id="accordion" role="tablist">

            <div class="panel panel-default" v-for="(item,index) in leftData">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a :href="'#collapse'+index" data-parent="#accordion" data-toggle="collapse">
                            {{item.title}}
                        </a>
                    </h4>
                </div>
                <div :id="'collapse'+index" class="panel-collapse collapse">
                    <ul class="list-group">
                        <li class="list-group-item" v-for="i in item.list">
                            <a :href="i.link">{{i.name}}</a>
                        </li>
                    </ul>
                </div>
            </div>

        </div>
    </div>
    <div class="col-md-9">
        <table class="table table-striped table-hover" id="review">
            <tr>
                <th>帖子标题</th>
                <th>发帖人</th>
                <th>修改</th>
                <th>删除</th>
            </tr>
            <tr v-for="reviewArticle in reviewArticleList">
                <td>
                    <a :href="'/article/page.html?articleId='+reviewArticle.article.articleId"
                       target="view_window">
                        {{reviewArticle.article.title}}
                    </a>
                </td>
                <td>{{reviewArticle.article.user.nickName}}</td>
                <td>
                    <button @click="pass(reviewArticle)" class="btn btn-success">通过</button>
                </td>
                <td>
                    <button @click="deleteA(reviewArticle)" class="btn btn-warning">删除</button>
                </td>
            </tr>
        </table>
    </div>
</div>
<script src="/js/admin.js"></script>
<script>
    $.get("/admin/reviewArticle/list", result => result.data.forEach(item => review.reviewArticleList.push(item)));
</script>
</body>
</html>
